% function plot_cavity_stream


fprintf('At last, let us plot the finest solution when Renold = %f. Please wait for a while...\n',renold);
% % temp for show the result;
% [z,tris,pts] = heval(dofs,V,T,posT,x,make_mesh(d),d,d);
% figure;trisurf(tris,pts(:,1),pts(:,2),z);
xmin = min(V(:,1)); xmax = max(V(:,1));
ymin = min(V(:,2)); ymax = max(V(:,2));
x = linspace(xmin,xmax,200); y= linspace(ymin,ymax,200);
[X,Y] = meshgrid(x,y);
Z = geval(dofs,V,T,posT,d,c,X(:),Y(:));
% figure; surf(X,Y,reshape(Z,size(X))); shading interp;
L_stream=[-1e-10 -1e-7 -1e-5 -1e-4 -0.01 -0.03 -0.05 -0.07 -0.09 -0.1 -0.11 -0.115 ...
                -0.1175 1e-8 1e-7 1e-6 1e-5 5e-5 1e-4 2.5e-4 5e-4 1e-3 1.5e-3 3e-3 0 0.5  ...
                1 2 3 4 5 -0.5 -1 -2 -3];
% plot density figure for stream function:
figure;contour(X,Y,reshape(Z,size(X)),40);
hold on;contour(X,Y,reshape(Z,size(X)),L_stream);
% title(strcat('Renold = ',num2str(renold)));
hold off;
% png_file = sprintf('E:\\workspace\\10.thesis\\doc\\chap5\\stream_re%d.png',Renold_good);
% eps_file = sprintf('E:\\workspace\\10.thesis\\doc\\chap5\\stream_re%d.eps',Renold_good);
% print('-dpng', png_file);
% print ('-depsc',eps_file);